<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        {# 引入layui\jquery #}
        <link rel="stylesheet" href="/static/layui/css/layui.css">
        <script type="text/javascript" src="/static/js/jquery-3.3.1.min.js"></script>
        <script type="text/javascript" src="/static/layui/layui.js"></script>

        {# 设置 #}
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        {#   网页标题    #}
        <title>{% block title %}Title{% endblock %}</title>
    </head>
    <body>
        {% block content %}
    
        {% endblock %}
        <input type="button" onclick="AjaxSubmit();" value="提交">
 <script>
        $.ajaxSetup({
            data:{csrfmiddlewaretoken:'{{ csrf_token }}'}
        })
    </script>
<script>
    function AjaxSubmit() {
        var host = '127.0.0.1';
        var port = '8080';
        $.ajax({
            url:'/ajax_submit/',
            type:'POST',
            data:{host:host, port:port},
            success:function (arg){

            }
        })
    }
</script>
    </body>
</html>